package com.yuhs.zixing.study.think.java.s03;

/**
 * @description 赋值  对象赋值？ 引用
 * @author: yuhs
 * @date 2021/12/20 下午8:51
 */
class Number {
    int i;
}

public class Code_003_Assignment {
    public static void main(String[] args) {
        Number n1 = new Number();
        Number n2 = new Number();
        n1.i = 9;
        n2.i = 47;
        System.out.println("1: n1.i: " + n1.i + ", n2.i: " + n2.i);
        n1 = n2;
        System.out.println("2: n1.i: " + n1.i + ", n2.i: " + n2.i);
        n1.i = 27;
        System.out.println("3: n1.i: " + n1.i + ", n2.i: " + n2.i);
    }
}
